import qs from 'qs'

import request from './request.js'

export const JingPinAPI = () => request.get("/products/recommend")

export const ReMenAPI = () => request.get("/products/hot")

export const SendSMSAPI = (params) => request.post("/sendSMS", qs.stringify(params))

export const PhoneReginAPI = (params) => request.post("/phoneRegin", qs.stringify(params))

export const WeiXinLoginAPI = (params) => request.post("/wechatUsers/PCLogin", qs.stringify(params));

export const BindingAPI = (params) => request.post("/wechatUsers/binding", qs.stringify(params));

export const UserProfilesAPI = () => request.get("/shop/userProfiles")

export const GoodsDetailsAPI = (id) => request.get(`/products/${id}`)

export const CartsAddAPI = (params) => request.post("/shop/carts/add", qs.stringify(params));

export const GoodsSearchAPI = (params) => request.get("/products", { params })

export const CartsDataAPI = () => request.get("/shop/carts")


